/**
 * @author hoang.pt
 * @version $Id$
 */

package test4.problem3;


/**
 * Demo
 * @author hoang.pt
 */
public class P3Demo {
    /**
     * constructor
     */
    public P3Demo() {
    }

    /**
     * main
     * @param a
     */
    public static void main(String[] a) {
        //init Data
        Data d = new Data();

        //init thread 1 get data
        Thread1 t1= new Thread1(d);

        //init thread 2 display
        Thread2 t2= new Thread2(d);

        //joining
        try {
            //join
            t1.t.join();
            t2.t.join();
        } catch (InterruptedException ex) {
            System.out.println("Mother want go home for doing exercise.");
        }

    }
}
